package server.container;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Host {

    private String name;
    private String appBase;

    private Map<String,Context> contextList = new HashMap<>();

    public Host(String name, String appBase) {
        this.name = name;
        this.appBase = appBase;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAppBase() {
        return appBase;
    }

    public void setAppBase(String appBase) {
        this.appBase = appBase;
    }

    public void addContext(String contextPath,Context context) {

        contextList.put(contextPath,context);
    }

    public Context getContextByPath(String contextPath) {
        return contextList.get(contextPath);
    }
}
